Skip to contentSkip to conversation

Migrating npm installation script into Yocto BSP

DISCUSSION Daniel Kampert 2 participants 4 messages Mar 17, 2025

lore
Share & tools
lore
#0 lore raw

Hi,

I have a BSP with a npm installation script. The script is sourced during the initialization and contains the following commands:

#!/bin/sh

# Install Node.js version 18.20.2
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 18.20.2

# Install pm2 via npm
npm --prefix /opt/app/backend/ install

Now I´m wondering how I can add this to the Yocto recipes of my BSP. The current Dunfell BSP only supports npm 14.x but I need this upgrade to 18.20.

How can I do it? Has someone done anything similar so far?

Thanks for help!

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected] mailto:[email protected]
Web: www.daniel-kampert.de https://www.daniel-kampert.de

#1 lore raw

Dunfell reached end of life almost a year ago, and is no longer supported. You need to update to a more recent yocto.

Alex

Quoted 39 lines · Daniel Kampert via lists.yoctoproject.org

Hi,

I have a BSP with a npm installation script. The script is sourced during the initialization and contains the following commands:

#!/bin/sh

# Install Node.js version 18.20.2
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 18.20.2

# Install pm2 via npm
npm --prefix /opt/app/backend/ install

Now I´m wondering how I can add this to the Yocto recipes of my BSP. The current Dunfell BSP only supports npm 14.x but I need this upgrade to 18.20.

How can I do it? Has someone done anything similar so far?

Thanks for help!

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64959): https://lists.yoctoproject.org/g/yocto/message/64959
Mute This Topic: https://lists.yoctoproject.org/mt/111745830/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hi Alexander,

unfortunately upgrading to the latest version is not an option. I have to use Dunfell for the moment.

Quoted 45 lines

Alexander Kanavin via lists.yoctoproject.org <[email protected]> hat am 17.03.2025 11:24 CET geschrieben:

Dunfell reached end of life almost a year ago, and is no longer supported. You need to update to a more recent yocto.

Alex

Quoted 22 lines · Daniel Kampert via lists.yoctoproject.org

Hi,

I have a BSP with a npm installation script. The script is sourced during the initialization and contains the following commands:

#!/bin/sh

# Install Node.js version 18.20.2
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 18.20.2

# Install pm2 via npm
npm --prefix /opt/app/backend/ install

Now I´m wondering how I can add this to the Yocto recipes of my BSP. The current Dunfell BSP only supports npm 14.x but I need this upgrade to 18.20.

How can I do it? Has someone done anything similar so far?

Thanks for help!

Quoted 11 lines

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de

Quoted 7 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64960): https://lists.yoctoproject.org/g/yocto/message/64960
Mute This Topic: https://lists.yoctoproject.org/mt/111745830/9229641
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de (https://www.daniel-kampert.de)

#3 lore raw

You can attempt a backport of a newer nodejs recipe from newer yocto releases, but there will be problems, which you'll have to solve mostly on your own. Talk to your customer and suppliers first.

Alex

Quoted 66 lines · Daniel Kampert

Hi Alexander,

unfortunately upgrading to the latest version is not an option. I have to use Dunfell for the moment.

Quoted 45 lines

Alexander Kanavin via lists.yoctoproject.org <[email protected]> hat am 17.03.2025 11:24 CET geschrieben:

Dunfell reached end of life almost a year ago, and is no longer supported. You need to update to a more recent yocto.

Alex

Quoted 22 lines · Daniel Kampert via lists.yoctoproject.org

Hi,

I have a BSP with a npm installation script. The script is sourced during the initialization and contains the following commands:

#!/bin/sh

# Install Node.js version 18.20.2
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 18.20.2

# Install pm2 via npm
npm --prefix /opt/app/backend/ install

Now I´m wondering how I can add this to the Yocto recipes of my BSP. The current Dunfell BSP only supports npm 14.x but I need this upgrade to 18.20.

How can I do it? Has someone done anything similar so far?

Thanks for help!

Quoted 11 lines

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de

Quoted 7 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64960): https://lists.yoctoproject.org/g/yocto/message/64960
Mute This Topic: https://lists.yoctoproject.org/mt/111745830/9229641
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de (https://www.daniel-kampert.de)